﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace iTunesLibrary.Music
{
    public class Artist : IComparable<Artist>
    {
        #region Properties
        public string Name { get; set; }
        #endregion
        public bool Equals(Artist obj)
        {
            if (ReferenceEquals(null, obj)) return false;
            if (ReferenceEquals(this, obj)) return true;
            return Equals(obj.Name, Name);
        }
        public override bool Equals(object obj)
        {
            if (ReferenceEquals(null, obj)) return false;
            if (ReferenceEquals(this, obj)) return true;
            if (obj.GetType() != typeof(Album)) return false;
            return Equals((Album)obj);
        }
        public int CompareTo(Artist other)
        {
            int result = String.Compare(Name, other.Name, StringComparison.CurrentCultureIgnoreCase);
            return result;
        }
    }
}
